/**
 * @Author Big_white
 * @Date 2021/11/12
 */
public class Client {
    public static void main(String[] args) {
        //创建一个工厂类
        WebSiteFactory webSiteFactory=new WebSiteFactory();
        //客户要以一个新闻形式发布的网站
        WebSite webSite1= webSiteFactory.getWebSiteCategory("新闻");

        webSite1.use(new User("tom"));
        WebSite webSite2 = webSiteFactory.getWebSiteCategory("博客");
        webSite2.use(new User("jack"));
        WebSite webSite3 = webSiteFactory.getWebSiteCategory("博客");
        webSite3.use(new User("smith"));
        WebSite webSite4 = webSiteFactory.getWebSiteCategory("csdn");
        webSite4.use(new User("king"));
        System.out.println("网站的分类共="+webSiteFactory.getWebSiteCount());
    }
}
